<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<h3>最新动态</h3>
		标题<input type="text" class="title" />
		原文链接<input type="text" class="http" /> 
		<input type="button" name="" id="btn" value="提交" /><br /><br />
		
         <h3>社区热帖</h3>
         标题<input type="text" class="title2" />
		原文链接<input type="text" class="http2" /> 
		<input type="button" name="" id="btn2" value="提交" /><br /><br />
		
		
		<h3>图片</h3>
		网址<input type="text" class="href" />
		图片地址<input type="text" class="scr" /> 
		文字<input type="text" class="txt" /> 
		<input type="button" name="" id="btom" value="提交" />
		
	</body>
	<script src="js/jquery-1.12.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
			var newDate = new Date();
			var y =newDate.getFullYear();
			var m =newDate.getMonth()+1;
			var d =newDate.getDate();
		$(function() {
			$("#btn").on("click", function() {
				$.ajax({
					type: "get",
					url: "http://localhost/%E8%91%A1%E8%90%84/msg_api.php",
					data: {
						title: $(".title").val(),						
						http: $(".http").val(),
						y:y,
						m:m,
						d:d,
						act: "get"
					}
				});
			})
			$("#btn2").on("click", function() {
				$.ajax({
					type: "get",
					url: "http://localhost/%E8%91%A1%E8%90%84/msg_api.php",
					data: {
						title2: $(".title2").val(),						
						http2: $(".http2").val(),
						y:y,
						m:m,
						d:d,
						act: "get2"
					}
				});
			})
			$("#btom").on("click", function() {
				$.ajax({
					type: "get",
					url: "http://localhost/%E8%91%A1%E8%90%84/msg_api.php",
					data: {
						href: $(".href").val(),						
						scr: $(".scr").val(),
						txt: $(".txt").val(),
						act: "shequ"
					}
				});
			})
		})
	</script>

</html>